package com.jeesite.modules.rt.entity;

import javax.validation.constraints.Size;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

import java.util.Date;

/**
 * 版本Entity
 * @author 李寒冰
 * @version 2024-11-04
 */
@Table(name="rt_version", alias="a", label="版本信息", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="code", attrName="code", label="序号"),
		@Column(name="name", attrName="name", label="版本名称"),
		@Column(name="shuoming", attrName="shuoming", label="更新说明"),
		@Column(name="type", attrName="type", label="1 安卓 2 IOS 3 鸿蒙"),
		@Column(name="version", attrName="version", label="版本"),
		@Column(name="is_qingzhi", attrName="isQingzhi", label="是否强制更新 0 否 1是"),
		@Column(name="update_time", attrName="updateTime", label="更新时间"),
		@Column(name="url", attrName="url", label="下载地址"),
	}, orderBy="a.code DESC"
)
public class RtVersion extends DataEntity<RtVersion> {
	
	private static final long serialVersionUID = 1L;
	private String code;		// 序号
	private String name;		// 版本名称
	private String shuoming;		// 更新说明
	private Long type;		// 1 安卓 2 IOS 3 鸿蒙
	private String version;		// 版本
	private Integer isQingzhi;
	private Date updateTime;
	private String url;

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public Integer getIsQingzhi() {
		return isQingzhi;
	}

	public void setIsQingzhi(Integer isQingzhi) {
		this.isQingzhi = isQingzhi;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public RtVersion() {
		this(null);
	}
	
	public RtVersion(String id){
		super(id);
	}
	
	@Size(min=0, max=255, message="序号长度不能超过 255 个字符")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	@Size(min=0, max=255, message="版本名称长度不能超过 255 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Size(min=0, max=255, message="更新说明长度不能超过 255 个字符")
	public String getShuoming() {
		return shuoming;
	}

	public void setShuoming(String shuoming) {
		this.shuoming = shuoming;
	}
	
	public Long getType() {
		return type;
	}

	public void setType(Long type) {
		this.type = type;
	}
	
	@Size(min=0, max=255, message="版本长度不能超过 255 个字符")
	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}
	
}